package com.tudou.geo.action;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import com.tudou.geo.action.support.BaseAction;
import com.tudou.geo.service.DigService;

@Controller
public class AdminAction extends BaseAction{

	private static final long serialVersionUID = -8776410901029527145L;
	private static Logger logger = Logger.getLogger(AdminAction.class);
	
	private String city;
	@Autowired
	private DigService digService;
	private String digData;
	
	@Action("/digItems")
	public String digItems(){
		digData = digService.getDigByCity(city);
		logger.debug(digData);
		return SUCCESS;
	}
	
	@Action("/index")
	public String go(){
		return SUCCESS;
	}
	
	

	public void setCity(String city) {
		this.city = city;
	}

	public String getDigData() {
		return digData;
	}
	
	
}
